home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
MiscKit1.7.1
/
MiscKitArchive.mbox
/
mbox
/
000240_misckit-reques…aska.et.byu.edu_Tue Jul 5 11:29:15 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-10-30
|
4KB
Return-Path: <misckit-request@alaska.et.byu.edu>
Received: from alaska.et.byu.edu by darth.byu.edu (NX5.67d/NX3.0M)
id AA01728; Tue, 5 Jul 94 11:28:56 -0600
Received: from YVAX2.BYU.EDU by alaska.et.byu.edu; Tue, 5 Jul 1994 07:43:27 -0600
Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-7 #7277)
id <01HEC8HGE1TS0Q81BR@yvax.byu.edu>; Tue, 5 Jul 1994 07:43:10 MDT
Received: from alaska.et.byu.edu by yvax.byu.edu (PMDF V4.3-7 #7277)
id <01HEC8HD1JA8HTTMOV@yvax.byu.edu>; Tue, 5 Jul 1994 07:43:05 MDT
Received: from YVAX2.BYU.EDU by alaska.et.byu.edu; Tue,
5 Jul 1994 07:40:30 -0600
Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-7 #7277)
id <01HEC8DR2WB48ZI52H@yvax.byu.edu>; Tue, 5 Jul 1994 07:40:10 MDT
Received: from NeXT.COM by yvax.byu.edu (PMDF V4.3-7 #7277)
id <01HEC8DOB0UOHTTIQL@yvax.byu.edu>; Tue, 5 Jul 1994 07:40:07 MDT
Received: from zone by oz.NeXT.COM (NX5.67e/NeXT0.1-Aleph-bf) id AA23504; Tue,
5 Jul 94 06:37:53 -0700
Received: from NeXT-Mail-2 (0.0) by zone.next.com (NX5.67d/NX3.0X)
id AA18661; Tue, 5 Jul 94 06:37:51 -0700
Date: Tue, 05 Jul 1994 06:37:23 -0700
From: Ali_Ozer@NeXT.COM (Ali Ozer)
Subject: Re: Foundation and Misc
In-Reply-To: <199407032117.AA03794@trwlasd.com>
To: tomi@shinto.nbg.sub.org, bruce@trwlasd.com, don@darth.byu.edu,
andrew@stone.com, miscstring@byu.edu
Cc: misckit@byu.edu
Message-Id: <9407051337.AA23504@oz.NeXT.COM>
Content-Transfer-Encoding: 7BIT
In-Reply-To-Doc: hNynDPeFQSfgVuf3WP0L1ci2Qk
X-Next-Documentid: zvrWhwG8fy8Epvy9srZA9jlwSj
Another option is to add the rich set of MiscString methods to NSString via
categories. The advantage of this approach would be that MiscString and
NSString would be interchangeable, and any NSString, even one created and
returned by the kit would respond to MiscString methods, avoiding consumers
from having to create MiscStrings from NSStrings all over the place. Also
you would not have to deal with Unicode issues.
I can think of two disadvantages to this:
1. Performance: These methods would have to go through NSString's primitives
2. You lose any state MiscString has which NSString doesn't
#1 isn't so bad. After all, once all these methods are added to NSString,
you can then make subclasses of NSString & NSMutableString available which
implement most of these methods efficiently (even if it's just for the case
where the characters are 8-bit; otherwise NSString takes over). Turns out
you already have this implementation in MiscString.
#2 isn't so bad either: The only additional state added by MiscString is the
string ordering table, and most consumers of MiscString probably don't use
this.
Ali
Begin forwarded message:
From: Bruce McKenzie <bruce@trwlasd.com>
Date: 1994-07-03 14:17:51 -0700
To: tsengel@cip.informatik.uni-erlangen.de
Subject: Re: Foundation and Misc
Cc: misckit@byu.edu, miscstring@byu.edu
content-transfer-encoding: 7BIT
> MiscString.... Hmm ok what about making it a subclass of
> NSString an add the missing methods + maybe some
> compatibility stuff for the first time. If the MiscKit would
> define a dummy NSString tomorrow we could start switching to
> the NSString where sufficient. And places that need more
> functionallity could be converted to Misc .... and would
> remain Misc in 4.0. It would be nice to use NSString really
> soon because methods should use it heavily for casting. If we
> have it all Misc.. We can distinguish later where NSString is
> sufficient and where MiscString really is required as an
> argument.
I'd recommend a different approach. Define a new class 'MiscStringNew'
(excuse me, I'm onomatopoetically challenged) that is the subclass of
NSString. Add the behaviour to it, and allow MiscString to wither (bug fixes
only) until the world is using MiscStringNew.
I think a critical part of this migration is the separation and refinement
of the API. Currently, MiscString is a kitchen sink of a class. There's a
lot of great stuff there, but it is neither complete nor consistent in its
offerings (e.g. you can search for chars in 37,000,000 ways, but there is
limited support for *non regex* string searching).
Bruce
---
Bruce McKenzie (spuds@netcom.com, NeXTMail welcome)
Atlas Software Ventures, Inc.
PO Box 1299, Santa Clara, CA 95052-1299
800/278-9909 (ASV-9909)
*** Software Development, specializing in NEXTSTEP ***
---